package com.lms.dto;

import java.util.ArrayList;
import java.util.List;

import com.lms.domain.NewProjects;
import com.lms.domain.Project;
import com.lms.domain.User;


public class ProjectMapper {
	
	public static ProjectDto mapProject(NewProjects project){
		//System.out.println("\n\n\n\n\n\n\n aaaaaaaaaaaaagh "+ project.getProjectId());
		ProjectDto dto = new ProjectDto();
		//dto.setId(project.getProId());
		dto.setProjectId(project.getProjectId());
		dto.setProjectName(project.getProjectName());
		dto.setProjectStartDate(project.getProjectStartDate());
		dto.setProjectEndDate(project.getProjectEndDate());
		return dto;
	}
	
	public static List<ProjectDto> map(List<NewProjects> projects) {
		List<ProjectDto> dtos = new ArrayList<ProjectDto>();
		for (NewProjects project: projects) {
			dtos.add(mapProject(project));
		}
		return dtos;
	}

}
